package com.learning.spring.ioc.application.event;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextStartedEvent;

/**
 * ClassName: ApplicationContextStartedListener
 * Description: Spring容器启动后，执行一些特定的业务代码，如初始化字典表、启动未执行的调度任务，加载缓存等等
 * Date: 2020/3/21 14:56 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public class ApplicationContextStartedListener implements ApplicationListener<ContextStartedEvent> {

    @Override
    public void onApplicationEvent(ContextStartedEvent applicationStartedEvent) {
        System.out.println("在Spring上下文容器启动后，初始化一些业务功能");
    }
}
